package com.stylefeng.guns.modular.customer.transfer;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

/**
 * 销售配套 excel模板类
 */
@Data
public class SaleXlsM {


    @ExcelIgnore
    private Integer customerCompanyId;

    @Excel(name = "客户企业名称",width = 20)
    @NotEmpty(message = "客户企业名称不能为空")
    private String customerCompanyName;

    @Excel(name = "统一社会信用代码",width = 20)
    @NotEmpty(message = "统一社会信用代码不能为空")
    private String unifiedSocialCreditCode;

    /**
     * 年度
     */
    @Excel(name = "年度")
    @NotNull(message ="年度不能为空" )
    private Integer year;

    /**
     * 客户
     */
    @Excel(name = "客户")
    @NotEmpty(message = "客户不能为空")
    private String  customerName;

    /**
     * 供应产品
     */
    @Excel(name = "供应产品")
    @NotEmpty(message = "供应产品不能为空")
    private String product;
    /**
     * 年供应量金额
     */
    @Excel(name = "年供应量金额",width = 12)
    @NotEmpty(message = "年供应量金额不能为空")
    private String annualSupply;
    /**
     * 应收账款余额
     */
    @Excel(name = "应收账款余额",width = 12)
    private String accountReceivableBalance;
    /**
     * 挂账余额
     */
    @Excel(name = "挂账余额")
    private String  creditBalance;
    /**
     * 现金收款量
     */
    @Excel(name = "现金收款量")
    private String cashReceipted;
    /**
     * 银票收款量
     */
    @Excel(name = "银票收款量")
    private String silverTicketRecivied;
    /**
     * 商票收款量
     */
    @Excel(name = "商票收款量")
    private String businessTicketRecivied;
    /**
     *  一般期限
     */
    @Excel(name = "一般期限")
    private String period;
    /**
     * 商票贴现量
     */
    @Excel(name = "商票贴现量")
    private String businessTicketDiscount;
    /**
     * 贴现利率
     */
    @Excel(name = "贴现利率")
    private String discountInterestRate;

    public static List<SaleXlsM> example(){
        List<SaleXlsM> list = new ArrayList<>();
        SaleXlsM saleXlsM = new SaleXlsM();
        list.add(saleXlsM);
        saleXlsM.setCustomerCompanyName("xxx有限公司");
        saleXlsM.setUnifiedSocialCreditCode("91440300088450013U");
        saleXlsM.setYear(2017);
        saleXlsM.setCustomerName("星星");
        saleXlsM.setProduct("挖掘机");
        saleXlsM.setAnnualSupply("10.0");
        saleXlsM.setAccountReceivableBalance("10.0");
        saleXlsM.setCreditBalance("10.1");
        saleXlsM.setCashReceipted("11");
        saleXlsM.setSilverTicketRecivied("0.0");
        saleXlsM.setBusinessTicketRecivied("0.0");
        saleXlsM.setPeriod("3");
        saleXlsM.setBusinessTicketDiscount("0.0");
        saleXlsM.setDiscountInterestRate("0.1");
        return list;
    }
}
